package game.square;

import static org.junit.Assert.assertEquals;
import game.dungeon.position.Direction;
import game.square.temperature.TemperatureScale;

import java.math.BigDecimal;
import java.util.ArrayList;

import org.junit.Before;
import org.junit.Test;


public class RockTest {

	private Rock rock, rockNeighbor;
	private SquareImpl neighbor_30Cel, neighbor_25Cel, neighbor_10Cel;
	/**
	 * Set up a mutable test fixture.
	 * 
	 */
	@Before
	public void setUp() throws Exception {
		rock = new Rock(false);
		rockNeighbor = new Rock(false);
		neighbor_10Cel = new CommonSquare(10, TemperatureScale.CELCIUS, BigDecimal.valueOf(1000,2), false, null, new ArrayList<Square>());
		neighbor_25Cel = new CommonSquare(25, TemperatureScale.CELCIUS, BigDecimal.valueOf(1000,2), false, null, new ArrayList<Square>());
		neighbor_30Cel = new CommonSquare(30, TemperatureScale.CELCIUS, BigDecimal.valueOf(1000,2), false, null, new ArrayList<Square>());
		rock.addNeighborInDirection(neighbor_10Cel, Direction.NORTH);
		rock.addNeighborInDirection(neighbor_25Cel, Direction.EAST);
		rock.addNeighborInDirection(neighbor_30Cel, Direction.SOUTH);
		rock.addNeighborInDirection(rockNeighbor, Direction.WEST);
	}
	
	@Test
	public final void getTemperature_SingleCase(){
		assertEquals(21,rock.getTemperature().getTemperatureValue(TemperatureScale.CELCIUS));
		}
	
	
}
